package togetherOne.dao;

import java.util.ArrayList;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import togetherOne.vo.ApplyVo;
import togetherOne.vo.JoinAppCulVo;

public class ApplyDaoImpl extends SqlMapClientDaoSupport implements ApplyDao {
	
	public void insertViceApply(ApplyVo app){
		getSqlMapClientTemplate().insert("apply.insertViceApply",app);
	}
	
	public void insertApply(ApplyVo app){
		getSqlMapClientTemplate().insert("apply.insertApply",app);
	}
	
	public void updateState2(int appNo){
		getSqlMapClientTemplate().update("apply.updateState2",appNo);
	}
	
	public void updateState3(int appNo){
		getSqlMapClientTemplate().update("apply.updateState3", appNo);
	}
	
	public void updateState4(int appNo){
		getSqlMapClientTemplate().update("apply.updateState4", appNo);
	}
	
	public void updateState5(int appNo){
		getSqlMapClientTemplate().update("apply.updateState5", appNo);
	}
	
	public void deleteApply(int appNo){
		getSqlMapClientTemplate().delete("apply.deleteApply", appNo);
	}
	
	public ArrayList<JoinAppCulVo> getAllViceApply(String memNo){
		return (ArrayList<JoinAppCulVo>) getSqlMapClientTemplate().queryForList("apply.getAllViceApply", memNo);
	}

	public ArrayList<JoinAppCulVo> getAllApply(String memNo){
		return (ArrayList<JoinAppCulVo>) getSqlMapClientTemplate().queryForList("apply.getAllApply", memNo);
	}
	
	public ArrayList<JoinAppCulVo> getAllCancelApply(String memNo){
		return (ArrayList<JoinAppCulVo>) getSqlMapClientTemplate().queryForList("apply.getAllCancelApply", memNo);
	}
}